package com.lt.bookkeeping.Fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.it.bookkeeping.greendao.Dao;
import com.it.bookkeeping.greendao.DaoSession;
import com.lt.bookkeeping.DataBaseApplication;

import java.util.Objects;

/**
 * @author LiuTong
 */
public class BaseFragment extends Fragment {
    protected DaoSession daoSession;

    public BaseFragment() {
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        DataBaseApplication dataBaseApplication = (DataBaseApplication) Objects.requireNonNull(getActivity()).getApplication();
        daoSession = dataBaseApplication.getDaoSession();
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return super.onCreateView(inflater, container, savedInstanceState);
    }

    @Override
    public void onResume() {
        super.onResume();

    }
}
